<!--客户地图-->
<ion-header>
    <ion-toolbar scroll="false">
        <ion-buttons start>
            <button ion-button icon-only (click)="backButtonClick($event)" style="background: transparent;padding-left: 3vw;padding-top: 3vw">
                <i class="toolbar-back"></i>
            </button>
        </ion-buttons>
        <ion-title>
            <div class="input-warp">
                <ion-input [(ngModel)]="searchDestination" id="destinationInput{{inputIdTime}}" type="text" placeholder="查找地点"></ion-input>
                <span [ngStyle]="{visibility:searchDestination&&searchDestination.length ? 'visible': 'hidden'}" (click)="cleanSearchKey()">&times;</span>
            </div>
        </ion-title>
        <ion-buttons end>
            <button ion-button icon-only style="background: transparent">
                <i></i>
            </button>
        </ion-buttons>
    </ion-toolbar>
    <!--<div class="select-range">-->
        <!--<div class="select-range-list">-->
            <!--<span class="range-text">附近</span>-->
            <!--<span *ngFor="let item of selectTypes" [ngClass]="{'selected':(item.selected)}"-->
                  <!--(click)="getSelectedType(item.type)">{{item.name}}</span>-->
        <!--</div>-->
    <!--</div>-->
    <ion-toolbar class="select-range">
        <div class="select-range-list">
            <span class="range-text">附近</span>
            <span *ngFor="let item of selectTypes" [ngClass]="{'selected':(item.selected)}"
                  (click)="getSelectedType(item.type)">{{item.name}}</span>
        </div>
    </ion-toolbar>
</ion-header>
<ion-content>
    <adp-map #adpMap>
    </adp-map>
    <div class="location-info" *ngIf="infoAddress">
        <p>{{infoAddress}}附近{{infoSelectName}}搜索到{{infoTotalNum}}名客户</p>
    </div>
    <div class="map-customer" *ngIf="currentCustomer">
        <ion-backdrop (click)="closeCustomer()"></ion-backdrop>
        <div class="current-customer">
            <div class="current-customer-content">
                <div class="customer-number" *ngIf="clientInfoList&&clientInfoList.clientInfo&&clientInfoList.clientInfo.length>=2">
                    <span (click)="preClient()" class="leftArrow" [ngClass]="{'disabled':clientInfoListIndex==0}"><i class="use" [ngClass]="{'notUse':clientInfoListIndex==0}"></i>上一位</span>
                    <span class="amount">共{{clientInfoList.clientInfo.length}}名客户</span>
                    <span (click)="nextClient()" class="rightArrow" [ngClass]="{'disabled':clientInfoListIndex==clientInfoList.clientInfo.length-1}">下一位<i class="use" [ngClass]="{'notUse':clientInfoListIndex==clientInfoList.clientInfo.length-1}"></i></span>
                </div>
                <div class="customer-name">
                    <img class="avatar" [src]="currentCustomer.avatar" alt="">
                    <span class="name" (click)="goCustomerDetail()">{{currentCustomer.name}}</span>
                    <div class="vip" *ngIf="currentCustomer.vipFlag">
                        <i [ngClass]="{'gold':currentCustomer.vipFlag == 1,'platinum':currentCustomer.vipFlag == 2,'diamond':currentCustomer.vipFlag == 3,'supreme':currentCustomer.vipFlag == 4}"></i>
                        <span style="display: none">{{ getDescribeByVipLevel(currentCustomer.vipFlag) }}</span>
                    </div>
                </div>
                <div class="customer-info">
                    <p class="info-text">{{currentCustomer.address}}</p>
                    <span class="info-text" *ngIf="currentCustomer.totalPolicy">保单数：{{currentCustomer.totalPolicy}}</span>
                    <span class="info-text" *ngIf="currentCustomer.birthDate">生日：{{currentCustomer.birthDate | dateTrans:'YYYY/MM/DD'}}</span>
                    <span class="info-text" *ngIf="currentCustomer.age">年龄：{{currentCustomer.age}}</span>
                </div>
                <div class="customer-tag" style="display: none" *ngIf="currentCustomer.tagList&&currentCustomer.tagList.length" [ngStyle]="{paddingBottom:currentCustomer.tagList&&currentCustomer.tagList.length?'2vw':'0'}">
                    <ng-container *ngFor="let item of currentCustomer.tagList;let index=index">
                        <span *ngIf="index === 0">{{item}}</span>
                        <span *ngIf="index === 1">{{item}}</span>
                    </ng-container>
                    <span *ngIf="currentCustomer.tagList.length>=3">...</span>
                </div>
                <div class="customer-btn">
                    <span class="nav" (click)="navOnAppHandle($event)">
                        <i class="call-nav"></i>
                        导航
                    </span>
                    <span class="call" [ngClass]="{'disabled':!currentCustomer.mobilePhone[0] || !currentCustomer.mobilePhone[0].mobile}" (click)="callCustomerHandle($event)">
                        <i class="call-phone"></i>
                        通话
                    </span>
                </div>
                <div class="customer-line" (click)="navCustomerHandle($event)">
                    <span>路线</span>
                </div>
            </div>
        </div>
    </div>
    <!--<ion-select #selectMobile interface="action-sheet" cancelText="取消">-->
        <!--<ion-option (ionSelect)="nativeCallPhone(num.mobile)" *ngFor="let num of currentMobileList">-->
            <!--{{num.mobile}}-->
        <!--</ion-option>-->
    <!--</ion-select>-->
</ion-content>
